<%@page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />

<form id="pagerForm" method="post" action="find_UserInfo">
	<input type="hidden" name="pageNum" value="1" /> <input type="hidden"
		name="numPerPage" value="${numPerPage}" /> <input type="hidden"
		name="orderField" value="${orderField}" /> <input type="hidden"
		name="orderDirection" value="${orderDirection}" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"
		action="find_UserInfo" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><input type="hidden" name="functionNum"
						value="hxlsysad0002"> <label> 用户编号： <input
							type="text" id="userId" name="userId" value="${userId}" />
					</label></td>
					<td><label> 用户姓名： <input type="text" id="userName"
							name="userName" value="${userName}" />
					</label></td>
					<td><label> 用户身份： </label> <select class="combox"
						name="userStatus" id="userStatus">
							<s:if test='userStatus == "读者"'>
								<option value="0">请选择</option>
								<option value="读者" selected="selected">读者</option>
								<option value="图书管理员">图书管理员</option>
								<option value="系统管理员">系统管理员</option>
							</s:if>
							<s:elseif test='userStatus == "图书管理员"'>
								<option value="0">请选择</option>
								<option value="读者">读者</option>
								<option value="图书管理员" selected="selected">图书管理员</option>
								<option value="系统管理员">系统管理员</option>
							</s:elseif>
							<s:elseif test='userStatus == "系统管理员"'>
								<option value="0">请选择</option>
								<option value="读者">读者</option>
								<option value="图书管理员">图书管理员</option>
								<option value="系统管理员" selected="selected">系统管理员</option>
							</s:elseif>
							<s:else>
								<option value="0" selected="selected">请选择</option>
								<option value="读者">读者</option>
								<option value="图书管理员">图书管理员</option>
								<option value="系统管理员">系统管理员</option>
							</s:else>
					</select></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查看</button>
							</div>
						</div>
					</li>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button id="reset2">重置</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="addUserInfo?functionNum=hxlsysad0010"
				target="dialog" mask="true" maxable=false minable=false
				resizable=false><span>添加</span> </a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="userIds"
				postType="string"
				href="delete_UserInfo_dwz?functionNum=hxlsysad0011" class="delete"><span>删除</span>
			</a></li>
			<li><a class="edit"
				href="before_update_UserInfo?userId={sid_user}&functionNum=hxlsysad0012"
				target="dialog" mask="true" maxable=false minable=false
				resizable=false warn="请选择一条用户信息"><span>修改</span> </a></li>
		</ul>
	</div>
	<table class="table" layoutH="138" targetType="navTab" asc="asc"
		desc="desc">
		<thead>
			<tr>
				<th width="22" align="center"><input type="checkbox"
					group="ids" class="checkboxCtrl"></th>
				<th width="100" align="center" orderField="userId"
					<s:if test="orderField=='userId'">class="${orderDirection}"</s:if>
					title="排序">用户编号</th>
				<th width="100" align="center">用户姓名</th>
				<th width="140" align="center">用户邮箱</th>
				<th width="100" align="center">用户电话</th>
				<th width="140" align="center">用户证件</th>
				<th width="100" align="center">用户身份</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator id="userInfo" value="userInfoList">
				<tr target="sid_user" rel="${userInfo.userId}">
					<td><input name="userIds" value="${userInfo.userId}"
						type="checkbox"></td>
					<td>${userInfo.userId}</td>
					<td>${userInfo.userName}</td>
					<td>${userInfo.email}</td>
					<td>${userInfo.telephone}</td>
					<td>${userInfo.papersNum}</td>
					<td>${userInfo.userStatus}</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage:this.value})">
				<option <s:if test="numPerPage==1">selected="selected"</s:if>
					value="1">1</option>
				<option <s:if test="numPerPage==5">selected="selected"</s:if>
					value="5">5</option>
				<option <s:if test="numPerPage==10">selected="selected"</s:if>
					value="10">10</option>
				<option <s:if test="numPerPage==15">selected="selected"</s:if>
					value="15">15</option>
				<option <s:if test="numPerPage==20">selected="selected"</s:if>
					value="20">20</option>
			</select> <span>条，共${totalCount}条</span>
		</div>

		<div class="pagination" targetType="${targetType}"
			totalCount="${totalCount}" numPerPage="${numPerPage}"
			pageNumShown="10" currentPage="${pageNum}"></div>
	</div>
</div>

<script type="text/javascript">
$(function($) {
	$("#reset2").click(function() {
		$('#userId').attr('value', "");
		$('#userName').attr('value', "");
		$("#userStatus").find("option[text='0']").attr("selected",true);
	});
});
</script>
